#ifndef NEWCUBE_H
#define NEWCUBE_H

#include <QWidget>
#include <qpainter.h>
#include <cubes.h>

namespace Ui {
class newcube;
}

class newcube : public QWidget
{
    Q_OBJECT

public:
    explicit newcube(QWidget *parent = 0);
    ~newcube();
    void paintEvent(QPaintEvent *event);

    //鼠标按下事件
    void mousePressEvent(QMouseEvent *event);
    //鼠标按下移动事件
    void mouseMoveEvent(QMouseEvent *event);
    //鼠标释放事件
  //  void mouseReleaseEvent(QMouseEvent *event);

    void drawcube(QPoint p);
    void clean(int a);


private slots:
    void on_dial_valueChanged(int value);

    void on_toolButton_clicked();



    void on_toolButton_2_clicked();

private:
    Ui::newcube *ui;
    QPoint p1,p2;
    QVector<QRect> vCube;
    bool start;
    int clean1;
    Cubes d;

};

#endif // NEWCUBE_H
